/////////////////////////////////////////////////////////////////////////
//
// Amuse Engine - graphics
// Copyright (c) 2014.  All Rights Reserved
//
// File:		AERenderer.inl
// Author:		Gianluca Belardelli
// Date:		08/09/2014
//
/////////////////////////////////////////////////////////////////////////
#ifndef _AERENDERER_INL_
#define _AERENDERER_INL_

AE_FORCEINLINE AERenderNode *AERenderer::GetRendererNode( AEINT32 nNodeIndex ) const 
{
	AEASSERT( nNodeIndex >= 0 && nNodeIndex < AE_MAX_RENDERER_NODES );
	return m_arrRenderNodes[nNodeIndex];
}

AE_FORCEINLINE AEINT32 AERenderer::GetRendererNodeIndex( AERenderNode *lpRendererNode ) const 
{
	return m_arrRenderNodes.IndexOf( lpRendererNode );
}

AE_FORCEINLINE AERenderNode *AERenderer::GetCurrentRendererNode( void ) const
{ 
	return m_lpCurrentRenderNode; 
}

AE_FORCEINLINE void AERenderer::SetCurrentRendererNode( AERenderNode *lpNode )
{ 
	m_lpCurrentRenderNode = lpNode; 
}

AE_FORCEINLINE AEINT32 AERenderer::GetRendererNodeCount( void ) const
{
	return m_arrRenderNodes.GetSize();
}

AE_FORCEINLINE AEVector4f AERenderer::GetDefaultClearColor( void ) const
{
	return m_vcDefaultClearColor;
}

AE_FORCEINLINE void AERenderer::SetSortTranslucentPrimitives( AEBOOL32 bStatus )
{
	m_bSortTranslucentPrimitives = bStatus;
}

AE_FORCEINLINE AEBOOL32 AERenderer::GetSortTranslucentPrimitives( void )
{
	return m_bSortTranslucentPrimitives;
}

AE_FORCEINLINE const AEVector4f &AERenderer::GetGlobalAmbientColor( void ) const
{
	return m_vcGlobalAmbient;
}

AE_FORCEINLINE void AERenderer::SetAutoLostDeviceHandling( AEOnOff ooStatus )
{
	m_bAutoLostDeviceHandling = ooStatus;
}

AE_FORCEINLINE AEOnOff AERenderer::GetAutoLostDeviceHandling( void ) const
{
	return (AEOnOff)m_bAutoLostDeviceHandling;
}

AE_FORCEINLINE AEBOOL32 AERenderer::IsInRenderLoop( void )
{
	return m_bInRenderLoop;
}

AE_FORCEINLINE void AERenderer::BeginRenderLoop( void )
{
	m_bInRenderLoop = true;
}

AE_FORCEINLINE void AERenderer::EndRenderLoop( void )
{
	m_bInRenderLoop = false;
}


#endif // _AERENDERER_INL_
